package exp02;

import java.util.Arrays;

public class SortWithObjectArray {
	//primary data type array (byte short int long float double char)
	public static void main(String[] args) {
		int[] a = new int[] { 1, 3, 5, 7, 9, 2, 4, 6, 8, 0 };
		Arrays.sort(a,5,10);//[fromIndex,endIndex)
		System.out.println(Arrays.toString(a));
		int key=7;
		Arrays.sort(a);
		int pos=Arrays.binarySearch(a, key);
		System.out.println(pos);
	}
}
